//package com.general.interceptor;
//
//import com.general.model.Manager;
//import org.springframework.web.servlet.HandlerInterceptor;
//import org.springframework.web.servlet.ModelAndView;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//
///**
// * Created by xiechur
// */
//@SuppressWarnings({ "unchecked" })
//public class SysInterceptor implements HandlerInterceptor {
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception {
//        System.out.println("SysInterceptor拦截");
//        HttpSession session = request.getSession();
//        Manager manager = (Manager)session.getAttribute("manager");
//        if (manager == null){
//            response.sendRedirect("/manage/syslogin.jsp");
//        }
//        return true;
//    }
//
//
//    public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
//
//    }
//
//    public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {
//
//    }
//}
